/* Lac Viet ERP                                                
 * Copyright (c) 2013 Lac Viet                                 
 * http://www.lacviet.com.vn                                   
 *=============================================================
 * File name            : SR_tblCustomers.cs         
 * Created by           : Auto - 04/23/2014 15:03:45                     
 * Last modify          : Auto - 04/23/2014 15:03:45                     
 * Version              : 1.0                                  
 * ============================================================
 */

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace LineOfBusiness.Poco
{
	[Serializable]
	public partial class SR_tblCustomers : BaseEntity
	{
		public SR_tblCustomers()
		{
            this.Balance = 0;
		}

	    #region Properties

		private string _CustomerID;

        [Key]
		[RegularExpression(@"[a-zA-Z0-9_-]*")]
		[Required]
        [MaxLength(20)]
        public string CustomerID 
		{ 
			get
			{
                return _CustomerID;
			}
			set 
			{ 
                _CustomerID = value;
			} 
		}

		private string _CustomerName;
        [MaxLength(100)]
        public string CustomerName 
		{ 
			get
			{
                return _CustomerName;
			}
			set 
			{ 
                _CustomerName = value;
			} 
		}

		private string _Address;
        [MaxLength(200)]
        public string Address 
		{ 
			get
			{
                return _Address;
			}
			set 
			{ 
                _Address = value;
			} 
		}

		private string _Phone1;
        [MaxLength(50)]
        public string Phone1 
		{ 
			get
			{
                return _Phone1;
			}
			set 
			{ 
                _Phone1 = value;
			} 
		}

		private string _Phone2;
        [MaxLength(50)]
        public string Phone2 
		{ 
			get
			{
                return _Phone2;
			}
			set 
			{ 
                _Phone2 = value;
			} 
		}

		private string _HandPhone;
        [MaxLength(50)]
        public string HandPhone 
		{ 
			get
			{
                return _HandPhone;
			}
			set 
			{ 
                _HandPhone = value;
			} 
		}

		private string _Email;
        [MaxLength(50)]
        public string Email 
		{ 
			get
			{
                return _Email;
			}
			set 
			{ 
                _Email = value;
			} 
		}

		private string _Website;
        [MaxLength(50)]
        public string Website 
		{ 
			get
			{
                return _Website;
			}
			set 
			{ 
                _Website = value;
			} 
		}

		private string _ContactName;
        [MaxLength(50)]
        public string ContactName 
		{ 
			get
			{
                return _ContactName;
			}
			set 
			{ 
                _ContactName = value;
			} 
		}

		private decimal _Balance;
		[Required]
        public decimal Balance 
		{ 
			get
			{
                return _Balance;
			}
			set 
			{ 
                _Balance = value;
			} 
		}

		private DateTime? _CreatedDate;
        public DateTime? CreatedDate 
		{ 
			get
			{
                return _CreatedDate;
			}
			set 
			{ 
                _CreatedDate = value;
			} 
		}

		private string _UserID;
        [MaxLength(20)]
        public string UserID 
		{ 
			get
			{
                return _UserID;
			}
			set 
			{ 
                _UserID = value;
			} 
		}
		/// <summary>
        /// Column: SR_tblSalesOrders.CustomerID
        /// </summary>
		public ICollection<SR_tblSalesOrders> SR_tblSalesOrders { get;set; }


        #endregion
	}
}
